package com.wangbo.springmvc001.managerimpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wangbo.springmvc001.dao.NameDAO;
import com.wangbo.springmvc001.daoimpl.NameDaoImpl;
import com.wangbo.springmvc001.entity.Name;
import com.wangbo.springmvc001.manager.NameManager;

@Service
@Transactional
public class NameManagerImpl implements NameManager{

	public List<Name> getList() {
		List<Name> ln  = nameDao.getList();
		System.out.println(ln);
		return ln;
	}
	
	@Autowired(required=false)
	private NameDAO nameDao;
	/*private NameDaoImpl nameDao;
	public NameDaoImpl getNameDao() {
		return nameDao;
	}
	@Autowired
	public void setNameDao(NameDaoImpl nameDao) {
		this.nameDao = nameDao;
	}*/
}
